#pragma once

#include <string>

namespace pf
{
	namespace FileIO
	{
		typedef cr::uint32_t FileHandle;
		static const FileHandle cInvalidFileHandle = (FileHandle)-1;

		enum EFileMode
		{
			EFileMode_Read,
			EFileMode_Write,
			EFileMode_ReadWrite,
		};

		FileHandle		FileOpen(const std::string& strFilename, EFileMode eFileMode);
		void			FileClose(FileHandle hFile);
		void			FileRead(FileHandle hFile, void* pDstBuffer, size_t bytesToRead);
		void			FileWrite(FileHandle hFile, const void* pSrcBuffer, size_t bytesToWrite);
		size_t			FileGetSize(const std::string& strFilename);
		size_t			FileGetSize(FileHandle hFile);
		bool			FileBusy(FileHandle hFile);
		cr::uint64_t	FileGetTimeStamp(const std::string& strFilename);
		cr::uint64_t	FileGetTimeStamp(FileHandle hFile);
	}
}